﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Threading;
using System.Globalization;

public partial class companypart_CompanyNotifications : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {

        DataSet newmsgs=DB.getdata("select * from system_messages where checked=0 and company_id in(0,"+Session["company_id"].ToString()+")");
        notificationsRepeater.DataSource = newmsgs.Tables[0];
        Page.DataBind();
        }
    }
    protected override void InitializeCulture()
    {
        if (Session["CurrentCulture"] != null)
        {
            string lang = Session["CurrentCulture"].ToString();
            if (lang != null && lang != "")
            {
                Thread.CurrentThread.CurrentUICulture = new CultureInfo(lang);
                Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(lang);
                Thread.CurrentThread.CurrentCulture.DateTimeFormat = new CultureInfo("en-US", false).DateTimeFormat;
                // Thread.CurrentThread.CurrentCulture.Calendar=new  System.Globalization.GregorianCalendar();

            }
        }
    }
    protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e)
    {

        //if (e.Row.RowType == DataControlRowType.DataRow)
        //{
        //    e.Row.Attributes.Add("onmouseover", "this.Mystyle=this.style.backgroundColor;this.style.backgroundColor='#FFFFA8'");

        //    e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=this.Mystyle");
        //}
    }
    protected void mailsnot_Click(object sender, ImageClickEventArgs e)
    {
        Response.Redirect("~/companypart/Sends.aspx");
    }
    //protected void aore_Click(object sender, EventArgs e)
    //{
    //    LinkButton lk = (LinkButton)sender;
    //    actualdate.Text = ((Label)lk.NamingContainer.FindControl("issuedate")).Text;
    //    string bb = lk.ToolTip;
    //    ViewState["maindata"] = bb;
    //    follows.Visible = true;
    //}
}
